<?php
/**
 * User: aka
 * Time: 2:02
 */

namespace app\http\middleware;

use think\facade\Session;

class RequestCheck
{
    public function handle($request, \Closure $next)
    {
        if (empty(Session::get('user_info'))) {
            return json('您还没有登录，请登录后再操作!');
        }

        return $next($request);
    }
}